Automatic changeover connection by magnetic contactor